package com.syf.core.utils.classscan;

import java.lang.annotation.Annotation;

public class AnnotationClassFilter implements ClassFilter<Class<? extends Annotation>> {
    private Class<? extends Annotation> annotation;

    public AnnotationClassFilter(Class<? extends Annotation> annotation) {
        this.annotation = annotation;
    }

    @Override
    public boolean isMatch(Class clazz) {
        return clazz.getAnnotation(annotation) == null ? false : true;
    }
}
